// ----------------------------------------------------------------------------
// diabindLoader120.cpp
// Load debug information using MS DIA 12.0
// ----------------------------------------------------------------------------

#include "stdafx.h"

#include "diabindLoader.h"

// ----------------------------------------------------------------------------

namespace
{

// ----------------------------------------------------------------------------

#include <MSDIA120\include\dia2.h>

// ----------------------------------------------------------------------------

}   // namespace <nameless>

// ----------------------------------------------------------------------------

namespace diabind
{

// ----------------------------------------------------------------------------

CSessionPtr CLoader::FromPdb120(const std::wstring &wstrFilePath)
{
    CLoaderFromPdb<IDiaDataSource> LoaderFromPdb(wstrFilePath);
    return FromT<IDiaDataSource, DiaSource>(LoaderFromPdb, "IDiaDataSource::loadDataFromPdb");
}

// ----------------------------------------------------------------------------

CSessionPtr CLoader::FromExe120(const std::wstring &wstrFilePath, const std::wstring &wstrSearchPath)
{
    CLoaderFromExe<IDiaDataSource, IDiaLoadCallback2, IDiaLoadCallback> LoaderFromExe(wstrFilePath, wstrSearchPath);
    return FromT<IDiaDataSource, DiaSource>(LoaderFromExe, "IDiaDataSource::loadDataForExe");
}

// ----------------------------------------------------------------------------

}   // namespace diabind

// ----------------------------------------------------------------------------

